package com.wxl.common.room.converter

import android.text.TextUtils
import androidx.room.TypeConverter
import com.alibaba.fastjson.JSONArray
import com.wxl.common.room.entity.UnApplyBlastEntity

class JbqysTypeConverter {


    @TypeConverter
     fun stringToSomeObjectList(data:String) : UnApplyBlastEntity.JbqysBean {
        if (TextUtils.isEmpty(data)) {
            return UnApplyBlastEntity.JbqysBean()
        }
        return JSONArray.parseObject(data,UnApplyBlastEntity.JbqysBean::class.java)
    }

    @TypeConverter
     fun someObjectListToString(someObjects:UnApplyBlastEntity.JbqysBean ) :String{
        return JSONArray.toJSONString(someObjects)
    }
}